package com.zj.osm.entity.db;

import java.util.List;
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.internal.DaoConfig;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import org.greenrobot.greendao.query.Query;
import org.greenrobot.greendao.query.QueryBuilder;

import com.zj.osm.entity.greendao.PointAndLineBean;

import com.zj.osm.entity.greendao.Point;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/** 
 * DAO for table "POINT".
*/
public class PointDao extends AbstractDao<Point, Long> {

    public static final String TABLENAME = "POINT";

    /**
     * Properties of entity Point.<br/>
     * Can be used for QueryBuilder and for referencing column names.
     */
    public static class Properties {
        public final static Property Id = new Property(0, Long.class, "id", true, "_id");
        public final static Property Name = new Property(1, String.class, "name", false, "NAME");
        public final static Property EquipType_id = new Property(2, int.class, "equipType_id", false, "EQUIP_TYPE_ID");
        public final static Property High = new Property(3, String.class, "high", false, "HIGH");
        public final static Property State = new Property(4, String.class, "state", false, "STATE");
        public final static Property PointId = new Property(5, String.class, "pointId", false, "POINT_ID");
        public final static Property Uid = new Property(6, String.class, "uid", false, "UID");
        public final static Property DefaultLineType = new Property(7, String.class, "DefaultLineType", false, "DEFAULT_LINE_TYPE");
        public final static Property EquipName = new Property(8, String.class, "equipName", false, "EQUIP_NAME");
        public final static Property Mark = new Property(9, String.class, "mark", false, "MARK");
        public final static Property EquipType_name = new Property(10, String.class, "equipType_name", false, "EQUIP_TYPE_NAME");
        public final static Property Longitude = new Property(11, Double.class, "longitude", false, "LONGITUDE");
        public final static Property Latitude = new Property(12, Double.class, "latitude", false, "LATITUDE");
        public final static Property LegendTypeKey = new Property(13, String.class, "LegendTypeKey", false, "LEGEND_TYPE_KEY");
        public final static Property Dangju = new Property(14, double.class, "dangju", false, "DANGJU");
        public final static Property LatA = new Property(15, String.class, "latA", false, "LAT_A");
        public final static Property LatB = new Property(16, String.class, "latB", false, "LAT_B");
        public final static Property LonA = new Property(17, String.class, "lonA", false, "LON_A");
        public final static Property LonB = new Property(18, String.class, "lonB", false, "LON_B");
        public final static Property Main_rod_uid = new Property(19, String.class, "main_rod_uid", false, "MAIN_ROD_UID");
        public final static Property Deputy_rod_uid = new Property(20, String.class, "deputy_rod_uid", false, "DEPUTY_ROD_UID");
        public final static Property Category = new Property(21, String.class, "category", false, "CATEGORY");
        public final static Property IsT = new Property(22, String.class, "isT", false, "IS_T");
        public final static Property Whether = new Property(23, String.class, "whether", false, "WHETHER");
        public final static Property Batch = new Property(24, String.class, "batch", false, "BATCH");
        public final static Property Sblx = new Property(25, String.class, "sblx", false, "SBLX");
        public final static Property Glsb = new Property(26, String.class, "glsb", false, "GLSB");
        public final static Property Length = new Property(27, String.class, "length", false, "LENGTH");
        public final static Property Width = new Property(28, String.class, "width", false, "WIDTH");
        public final static Property Icon = new Property(29, String.class, "icon", false, "ICON");
        public final static Property Address = new Property(30, String.class, "address", false, "ADDRESS");
        public final static Property EqupmentHeight = new Property(31, String.class, "equpmentHeight", false, "EQUPMENT_HEIGHT");
        public final static Property DipOfhorizon = new Property(32, String.class, "dipOfhorizon", false, "DIP_OFHORIZON");
        public final static Property LineDirection = new Property(33, String.class, "lineDirection", false, "LINE_DIRECTION");
        public final static Property ProjectId = new Property(34, Long.class, "projectId", false, "PROJECT_ID");
        public final static Property Note = new Property(35, String.class, "note", false, "NOTE");
        public final static Property RoadName = new Property(36, String.class, "roadName", false, "ROAD_NAME");
        public final static Property RoadAdress = new Property(37, String.class, "roadAdress", false, "ROAD_ADRESS");
        public final static Property RoadNature = new Property(38, String.class, "roadNature", false, "ROAD_NATURE");
        public final static Property GridName = new Property(39, String.class, "gridName", false, "GRID_NAME");
        public final static Property CabwellPy = new Property(40, String.class, "cabwellPy", false, "CABWELL_PY");
        public final static Property DljCC = new Property(41, String.class, "dljCC", false, "DLJ_CC");
        public final static Property RsState = new Property(42, String.class, "rsState", false, "RS_STATE");
        public final static Property GhYear = new Property(43, String.class, "ghYear", false, "GH_YEAR");
        public final static Property ReSpecfs = new Property(44, String.class, "reSpecfs", false, "RE_SPECFS");
    }

    private DaoSession daoSession;

    private Query<Point> line_PointListQuery;
    private Query<Point> project_PointListQuery;

    public PointDao(DaoConfig config) {
        super(config);
    }
    
    public PointDao(DaoConfig config, DaoSession daoSession) {
        super(config, daoSession);
        this.daoSession = daoSession;
    }

    /** Creates the underlying database table. */
    public static void createTable(Database db, boolean ifNotExists) {
        String constraint = ifNotExists? "IF NOT EXISTS ": "";
        db.execSQL("CREATE TABLE " + constraint + "\"POINT\" (" + //
                "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
                "\"NAME\" TEXT," + // 1: name
                "\"EQUIP_TYPE_ID\" INTEGER NOT NULL ," + // 2: equipType_id
                "\"HIGH\" TEXT," + // 3: high
                "\"STATE\" TEXT," + // 4: state
                "\"POINT_ID\" TEXT," + // 5: pointId
                "\"UID\" TEXT," + // 6: uid
                "\"DEFAULT_LINE_TYPE\" TEXT," + // 7: DefaultLineType
                "\"EQUIP_NAME\" TEXT," + // 8: equipName
                "\"MARK\" TEXT," + // 9: mark
                "\"EQUIP_TYPE_NAME\" TEXT," + // 10: equipType_name
                "\"LONGITUDE\" REAL," + // 11: longitude
                "\"LATITUDE\" REAL," + // 12: latitude
                "\"LEGEND_TYPE_KEY\" TEXT," + // 13: LegendTypeKey
                "\"DANGJU\" REAL NOT NULL ," + // 14: dangju
                "\"LAT_A\" TEXT," + // 15: latA
                "\"LAT_B\" TEXT," + // 16: latB
                "\"LON_A\" TEXT," + // 17: lonA
                "\"LON_B\" TEXT," + // 18: lonB
                "\"MAIN_ROD_UID\" TEXT," + // 19: main_rod_uid
                "\"DEPUTY_ROD_UID\" TEXT," + // 20: deputy_rod_uid
                "\"CATEGORY\" TEXT," + // 21: category
                "\"IS_T\" TEXT," + // 22: isT
                "\"WHETHER\" TEXT," + // 23: whether
                "\"BATCH\" TEXT," + // 24: batch
                "\"SBLX\" TEXT," + // 25: sblx
                "\"GLSB\" TEXT," + // 26: glsb
                "\"LENGTH\" TEXT," + // 27: length
                "\"WIDTH\" TEXT," + // 28: width
                "\"ICON\" TEXT," + // 29: icon
                "\"ADDRESS\" TEXT," + // 30: address
                "\"EQUPMENT_HEIGHT\" TEXT," + // 31: equpmentHeight
                "\"DIP_OFHORIZON\" TEXT," + // 32: dipOfhorizon
                "\"LINE_DIRECTION\" TEXT," + // 33: lineDirection
                "\"PROJECT_ID\" INTEGER," + // 34: projectId
                "\"NOTE\" TEXT," + // 35: note
                "\"ROAD_NAME\" TEXT," + // 36: roadName
                "\"ROAD_ADRESS\" TEXT," + // 37: roadAdress
                "\"ROAD_NATURE\" TEXT," + // 38: roadNature
                "\"GRID_NAME\" TEXT," + // 39: gridName
                "\"CABWELL_PY\" TEXT," + // 40: cabwellPy
                "\"DLJ_CC\" TEXT," + // 41: dljCC
                "\"RS_STATE\" TEXT," + // 42: rsState
                "\"GH_YEAR\" TEXT," + // 43: ghYear
                "\"RE_SPECFS\" TEXT);"); // 44: reSpecfs
        // Add Indexes
        db.execSQL("CREATE UNIQUE INDEX " + constraint + "IDX_POINT_POINT_ID ON \"POINT\"" +
                " (\"POINT_ID\" ASC);");
        db.execSQL("CREATE UNIQUE INDEX " + constraint + "IDX_POINT_UID ON \"POINT\"" +
                " (\"UID\" ASC);");
    }

    /** Drops the underlying database table. */
    public static void dropTable(Database db, boolean ifExists) {
        String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"POINT\"";
        db.execSQL(sql);
    }

    @Override
    protected final void bindValues(DatabaseStatement stmt, Point entity) {
        stmt.clearBindings();
 
        Long id = entity.getId();
        if (id != null) {
            stmt.bindLong(1, id);
        }
 
        String name = entity.getName();
        if (name != null) {
            stmt.bindString(2, name);
        }
        stmt.bindLong(3, entity.getEquipType_id());
 
        String high = entity.getHigh();
        if (high != null) {
            stmt.bindString(4, high);
        }
 
        String state = entity.getState();
        if (state != null) {
            stmt.bindString(5, state);
        }
 
        String pointId = entity.getPointId();
        if (pointId != null) {
            stmt.bindString(6, pointId);
        }
 
        String uid = entity.getUid();
        if (uid != null) {
            stmt.bindString(7, uid);
        }
 
        String DefaultLineType = entity.getDefaultLineType();
        if (DefaultLineType != null) {
            stmt.bindString(8, DefaultLineType);
        }
 
        String equipName = entity.getEquipName();
        if (equipName != null) {
            stmt.bindString(9, equipName);
        }
 
        String mark = entity.getMark();
        if (mark != null) {
            stmt.bindString(10, mark);
        }
 
        String equipType_name = entity.getEquipType_name();
        if (equipType_name != null) {
            stmt.bindString(11, equipType_name);
        }
 
        Double longitude = entity.getLongitude();
        if (longitude != null) {
            stmt.bindDouble(12, longitude);
        }
 
        Double latitude = entity.getLatitude();
        if (latitude != null) {
            stmt.bindDouble(13, latitude);
        }
 
        String LegendTypeKey = entity.getLegendTypeKey();
        if (LegendTypeKey != null) {
            stmt.bindString(14, LegendTypeKey);
        }
        stmt.bindDouble(15, entity.getDangju());
 
        String latA = entity.getLatA();
        if (latA != null) {
            stmt.bindString(16, latA);
        }
 
        String latB = entity.getLatB();
        if (latB != null) {
            stmt.bindString(17, latB);
        }
 
        String lonA = entity.getLonA();
        if (lonA != null) {
            stmt.bindString(18, lonA);
        }
 
        String lonB = entity.getLonB();
        if (lonB != null) {
            stmt.bindString(19, lonB);
        }
 
        String main_rod_uid = entity.getMain_rod_uid();
        if (main_rod_uid != null) {
            stmt.bindString(20, main_rod_uid);
        }
 
        String deputy_rod_uid = entity.getDeputy_rod_uid();
        if (deputy_rod_uid != null) {
            stmt.bindString(21, deputy_rod_uid);
        }
 
        String category = entity.getCategory();
        if (category != null) {
            stmt.bindString(22, category);
        }
 
        String isT = entity.getIsT();
        if (isT != null) {
            stmt.bindString(23, isT);
        }
 
        String whether = entity.getWhether();
        if (whether != null) {
            stmt.bindString(24, whether);
        }
 
        String batch = entity.getBatch();
        if (batch != null) {
            stmt.bindString(25, batch);
        }
 
        String sblx = entity.getSblx();
        if (sblx != null) {
            stmt.bindString(26, sblx);
        }
 
        String glsb = entity.getGlsb();
        if (glsb != null) {
            stmt.bindString(27, glsb);
        }
 
        String length = entity.getLength();
        if (length != null) {
            stmt.bindString(28, length);
        }
 
        String width = entity.getWidth();
        if (width != null) {
            stmt.bindString(29, width);
        }
 
        String icon = entity.getIcon();
        if (icon != null) {
            stmt.bindString(30, icon);
        }
 
        String address = entity.getAddress();
        if (address != null) {
            stmt.bindString(31, address);
        }
 
        String equpmentHeight = entity.getEqupmentHeight();
        if (equpmentHeight != null) {
            stmt.bindString(32, equpmentHeight);
        }
 
        String dipOfhorizon = entity.getDipOfhorizon();
        if (dipOfhorizon != null) {
            stmt.bindString(33, dipOfhorizon);
        }
 
        String lineDirection = entity.getLineDirection();
        if (lineDirection != null) {
            stmt.bindString(34, lineDirection);
        }
 
        Long projectId = entity.getProjectId();
        if (projectId != null) {
            stmt.bindLong(35, projectId);
        }
 
        String note = entity.getNote();
        if (note != null) {
            stmt.bindString(36, note);
        }
 
        String roadName = entity.getRoadName();
        if (roadName != null) {
            stmt.bindString(37, roadName);
        }
 
        String roadAdress = entity.getRoadAdress();
        if (roadAdress != null) {
            stmt.bindString(38, roadAdress);
        }
 
        String roadNature = entity.getRoadNature();
        if (roadNature != null) {
            stmt.bindString(39, roadNature);
        }
 
        String gridName = entity.getGridName();
        if (gridName != null) {
            stmt.bindString(40, gridName);
        }
 
        String cabwellPy = entity.getCabwellPy();
        if (cabwellPy != null) {
            stmt.bindString(41, cabwellPy);
        }
 
        String dljCC = entity.getDljCC();
        if (dljCC != null) {
            stmt.bindString(42, dljCC);
        }
 
        String rsState = entity.getRsState();
        if (rsState != null) {
            stmt.bindString(43, rsState);
        }
 
        String ghYear = entity.getGhYear();
        if (ghYear != null) {
            stmt.bindString(44, ghYear);
        }
 
        String reSpecfs = entity.getReSpecfs();
        if (reSpecfs != null) {
            stmt.bindString(45, reSpecfs);
        }
    }

    @Override
    protected final void bindValues(SQLiteStatement stmt, Point entity) {
        stmt.clearBindings();
 
        Long id = entity.getId();
        if (id != null) {
            stmt.bindLong(1, id);
        }
 
        String name = entity.getName();
        if (name != null) {
            stmt.bindString(2, name);
        }
        stmt.bindLong(3, entity.getEquipType_id());
 
        String high = entity.getHigh();
        if (high != null) {
            stmt.bindString(4, high);
        }
 
        String state = entity.getState();
        if (state != null) {
            stmt.bindString(5, state);
        }
 
        String pointId = entity.getPointId();
        if (pointId != null) {
            stmt.bindString(6, pointId);
        }
 
        String uid = entity.getUid();
        if (uid != null) {
            stmt.bindString(7, uid);
        }
 
        String DefaultLineType = entity.getDefaultLineType();
        if (DefaultLineType != null) {
            stmt.bindString(8, DefaultLineType);
        }
 
        String equipName = entity.getEquipName();
        if (equipName != null) {
            stmt.bindString(9, equipName);
        }
 
        String mark = entity.getMark();
        if (mark != null) {
            stmt.bindString(10, mark);
        }
 
        String equipType_name = entity.getEquipType_name();
        if (equipType_name != null) {
            stmt.bindString(11, equipType_name);
        }
 
        Double longitude = entity.getLongitude();
        if (longitude != null) {
            stmt.bindDouble(12, longitude);
        }
 
        Double latitude = entity.getLatitude();
        if (latitude != null) {
            stmt.bindDouble(13, latitude);
        }
 
        String LegendTypeKey = entity.getLegendTypeKey();
        if (LegendTypeKey != null) {
            stmt.bindString(14, LegendTypeKey);
        }
        stmt.bindDouble(15, entity.getDangju());
 
        String latA = entity.getLatA();
        if (latA != null) {
            stmt.bindString(16, latA);
        }
 
        String latB = entity.getLatB();
        if (latB != null) {
            stmt.bindString(17, latB);
        }
 
        String lonA = entity.getLonA();
        if (lonA != null) {
            stmt.bindString(18, lonA);
        }
 
        String lonB = entity.getLonB();
        if (lonB != null) {
            stmt.bindString(19, lonB);
        }
 
        String main_rod_uid = entity.getMain_rod_uid();
        if (main_rod_uid != null) {
            stmt.bindString(20, main_rod_uid);
        }
 
        String deputy_rod_uid = entity.getDeputy_rod_uid();
        if (deputy_rod_uid != null) {
            stmt.bindString(21, deputy_rod_uid);
        }
 
        String category = entity.getCategory();
        if (category != null) {
            stmt.bindString(22, category);
        }
 
        String isT = entity.getIsT();
        if (isT != null) {
            stmt.bindString(23, isT);
        }
 
        String whether = entity.getWhether();
        if (whether != null) {
            stmt.bindString(24, whether);
        }
 
        String batch = entity.getBatch();
        if (batch != null) {
            stmt.bindString(25, batch);
        }
 
        String sblx = entity.getSblx();
        if (sblx != null) {
            stmt.bindString(26, sblx);
        }
 
        String glsb = entity.getGlsb();
        if (glsb != null) {
            stmt.bindString(27, glsb);
        }
 
        String length = entity.getLength();
        if (length != null) {
            stmt.bindString(28, length);
        }
 
        String width = entity.getWidth();
        if (width != null) {
            stmt.bindString(29, width);
        }
 
        String icon = entity.getIcon();
        if (icon != null) {
            stmt.bindString(30, icon);
        }
 
        String address = entity.getAddress();
        if (address != null) {
            stmt.bindString(31, address);
        }
 
        String equpmentHeight = entity.getEqupmentHeight();
        if (equpmentHeight != null) {
            stmt.bindString(32, equpmentHeight);
        }
 
        String dipOfhorizon = entity.getDipOfhorizon();
        if (dipOfhorizon != null) {
            stmt.bindString(33, dipOfhorizon);
        }
 
        String lineDirection = entity.getLineDirection();
        if (lineDirection != null) {
            stmt.bindString(34, lineDirection);
        }
 
        Long projectId = entity.getProjectId();
        if (projectId != null) {
            stmt.bindLong(35, projectId);
        }
 
        String note = entity.getNote();
        if (note != null) {
            stmt.bindString(36, note);
        }
 
        String roadName = entity.getRoadName();
        if (roadName != null) {
            stmt.bindString(37, roadName);
        }
 
        String roadAdress = entity.getRoadAdress();
        if (roadAdress != null) {
            stmt.bindString(38, roadAdress);
        }
 
        String roadNature = entity.getRoadNature();
        if (roadNature != null) {
            stmt.bindString(39, roadNature);
        }
 
        String gridName = entity.getGridName();
        if (gridName != null) {
            stmt.bindString(40, gridName);
        }
 
        String cabwellPy = entity.getCabwellPy();
        if (cabwellPy != null) {
            stmt.bindString(41, cabwellPy);
        }
 
        String dljCC = entity.getDljCC();
        if (dljCC != null) {
            stmt.bindString(42, dljCC);
        }
 
        String rsState = entity.getRsState();
        if (rsState != null) {
            stmt.bindString(43, rsState);
        }
 
        String ghYear = entity.getGhYear();
        if (ghYear != null) {
            stmt.bindString(44, ghYear);
        }
 
        String reSpecfs = entity.getReSpecfs();
        if (reSpecfs != null) {
            stmt.bindString(45, reSpecfs);
        }
    }

    @Override
    protected final void attachEntity(Point entity) {
        super.attachEntity(entity);
        entity.__setDaoSession(daoSession);
    }

    @Override
    public Long readKey(Cursor cursor, int offset) {
        return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
    }    

    @Override
    public Point readEntity(Cursor cursor, int offset) {
        Point entity = new Point( //
            cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
            cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // name
            cursor.getInt(offset + 2), // equipType_id
            cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // high
            cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // state
            cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // pointId
            cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // uid
            cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // DefaultLineType
            cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // equipName
            cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // mark
            cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // equipType_name
            cursor.isNull(offset + 11) ? null : cursor.getDouble(offset + 11), // longitude
            cursor.isNull(offset + 12) ? null : cursor.getDouble(offset + 12), // latitude
            cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // LegendTypeKey
            cursor.getDouble(offset + 14), // dangju
            cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // latA
            cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // latB
            cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // lonA
            cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // lonB
            cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // main_rod_uid
            cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // deputy_rod_uid
            cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // category
            cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // isT
            cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // whether
            cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // batch
            cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // sblx
            cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // glsb
            cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // length
            cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // width
            cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // icon
            cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // address
            cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // equpmentHeight
            cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // dipOfhorizon
            cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33), // lineDirection
            cursor.isNull(offset + 34) ? null : cursor.getLong(offset + 34), // projectId
            cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35), // note
            cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36), // roadName
            cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37), // roadAdress
            cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // roadNature
            cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // gridName
            cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40), // cabwellPy
            cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41), // dljCC
            cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // rsState
            cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // ghYear
            cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44) // reSpecfs
        );
        return entity;
    }
     
    @Override
    public void readEntity(Cursor cursor, Point entity, int offset) {
        entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
        entity.setName(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
        entity.setEquipType_id(cursor.getInt(offset + 2));
        entity.setHigh(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
        entity.setState(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
        entity.setPointId(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
        entity.setUid(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
        entity.setDefaultLineType(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
        entity.setEquipName(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
        entity.setMark(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
        entity.setEquipType_name(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
        entity.setLongitude(cursor.isNull(offset + 11) ? null : cursor.getDouble(offset + 11));
        entity.setLatitude(cursor.isNull(offset + 12) ? null : cursor.getDouble(offset + 12));
        entity.setLegendTypeKey(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
        entity.setDangju(cursor.getDouble(offset + 14));
        entity.setLatA(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
        entity.setLatB(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
        entity.setLonA(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
        entity.setLonB(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
        entity.setMain_rod_uid(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
        entity.setDeputy_rod_uid(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
        entity.setCategory(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
        entity.setIsT(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
        entity.setWhether(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
        entity.setBatch(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
        entity.setSblx(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
        entity.setGlsb(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
        entity.setLength(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
        entity.setWidth(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
        entity.setIcon(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
        entity.setAddress(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
        entity.setEqupmentHeight(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
        entity.setDipOfhorizon(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
        entity.setLineDirection(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
        entity.setProjectId(cursor.isNull(offset + 34) ? null : cursor.getLong(offset + 34));
        entity.setNote(cursor.isNull(offset + 35) ? null : cursor.getString(offset + 35));
        entity.setRoadName(cursor.isNull(offset + 36) ? null : cursor.getString(offset + 36));
        entity.setRoadAdress(cursor.isNull(offset + 37) ? null : cursor.getString(offset + 37));
        entity.setRoadNature(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
        entity.setGridName(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
        entity.setCabwellPy(cursor.isNull(offset + 40) ? null : cursor.getString(offset + 40));
        entity.setDljCC(cursor.isNull(offset + 41) ? null : cursor.getString(offset + 41));
        entity.setRsState(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
        entity.setGhYear(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
        entity.setReSpecfs(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
     }
    
    @Override
    protected final Long updateKeyAfterInsert(Point entity, long rowId) {
        entity.setId(rowId);
        return rowId;
    }
    
    @Override
    public Long getKey(Point entity) {
        if(entity != null) {
            return entity.getId();
        } else {
            return null;
        }
    }

    @Override
    public boolean hasKey(Point entity) {
        return entity.getId() != null;
    }

    @Override
    protected final boolean isEntityUpdateable() {
        return true;
    }
    
    /** Internal query to resolve the "pointList" to-many relationship of Line. */
    public List<Point> _queryLine_PointList(Long lineId) {
        synchronized (this) {
            if (line_PointListQuery == null) {
                QueryBuilder<Point> queryBuilder = queryBuilder();
                queryBuilder.join(PointAndLineBean.class, PointAndLineBeanDao.Properties.PointId)
                    .where(PointAndLineBeanDao.Properties.LineId.eq(lineId));
                line_PointListQuery = queryBuilder.build();
            }
        }
        Query<Point> query = line_PointListQuery.forCurrentThread();
        query.setParameter(0, lineId);
        return query.list();
    }

    /** Internal query to resolve the "pointList" to-many relationship of Project. */
    public List<Point> _queryProject_PointList(Long projectId) {
        synchronized (this) {
            if (project_PointListQuery == null) {
                QueryBuilder<Point> queryBuilder = queryBuilder();
                queryBuilder.where(Properties.ProjectId.eq(null));
                project_PointListQuery = queryBuilder.build();
            }
        }
        Query<Point> query = project_PointListQuery.forCurrentThread();
        query.setParameter(0, projectId);
        return query.list();
    }

}
